package com.lpf.starter;

import com.lpf.starter.autoconfiguration.HelloProperties;
import com.lpf.starter.format.FormatProcessor;

public class HelloFormatTemplate {

    private final FormatProcessor formatProcessor;

    private final HelloProperties helloProperties;

    public HelloFormatTemplate(HelloProperties helloProperties, FormatProcessor formatProcessor) {
        this.helloProperties = helloProperties;
        this.formatProcessor = formatProcessor;
    }

    public <T> String doFormat() {
        System.out.println(formatProcessor.getClass());
        System.out.println(helloProperties);

        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(formatProcessor.getClass()).append("<br/>");
        stringBuilder.append(helloProperties.getInfo()).append("<br/>");
        // stringBuilder.append(helloProperties.getAbc());
        return stringBuilder.toString();

    }
}
